home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / network / atre12.zip / LF.ZIP / XMALLOC.C < prev   
C/C++ Source or Header  |  1991-07-05  |  249b  |  19 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <windows.h>
  4.  
  5. char *
  6. xmalloc(n)
  7. unsigned int n;
  8. {
  9. char *p;
  10.  
  11.    if ((p = malloc(n)) == NULL) {
  12.    /*
  13.       fprintf(stderr, "malloc failed\n");
  14.    */
  15.       exit(0);
  16.    }
  17.    return(p);
  18. }
  19.